#pragma once
#include "rclcpp/rclcpp.hpp"
#include "rclcpp_components/register_node_macro.hpp"

class AmclParamUpdater : public rclcpp::Node
{
public:
  AmclParamUpdater() : Node("param_updater")
  {
    parameters_client_ = std::make_shared<rclcpp::AsyncParametersClient>(
        this, "/amcl"); // 确保节点名称和命名空间正确
  }

  void update(double kld_error);

private:
  rclcpp::AsyncParametersClient::SharedPtr parameters_client_;
};